

<%@ page pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>

<!--把美工做好的静态网页html改为jsp,然后在里面写JSP代码 把美工的3部分逻辑分区拆开成了header.jsp footer.jsp和本文件-->
<!--day11把java代码都使用el表达式和jstl标签换掉-->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>listUsers</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" type="text/css" href="css/style.css" />
	</head>
	<body>
		<div id="wrap">
			<div id="top_content"> 
				<%@include file="header.jsp"  %>
				<div id="content">
					<p id="whereami">
					</p>
					<h1>
						用户列表
					</h1>
					<table class="table">
						<tr class="table_header">
							<td>ID</td><td>用户名</td><td>邮箱</td><td>电话</td><td>操作</td>
						</tr>
						
						<c:forEach items="${users}" var="v" varStatus="s">
						<tr class="row${s.count%2+1}"><td>${v.id}</td><td>${v.username}</td><td>${v.email}</td><td>${v.phone}</td>
						<td><a href="delUser.do?id=${v.id}" onclick= "return confirm('确定删除${v.username}吗？')" >删除</a></td></tr>&nbsp;
						</c:forEach>
						
					</table>
					<p>
						<input type="button" class="button" value="添加用户" onclick="location='addUser.jsp'"/>
					</p>
				</div>
			</div>
			<%@include file="footer.jsp" %>
		
	</body>
</html>
